<template>
	<view class="home">
		<view class="bg">
			<image :src="baseImgUrl+'home/home_bac.png'" mode=""></image>
		</view>
		<nav-bar :showLeftIcon="true" :leftSlot="true" backgroundColor="transparent">
			<template v-slot:leftSlot>
				<view class="logo-header">
					<image src="@/static/images/logo.png" mode="scaleToFill"></image>
					<view class="title">
						消易云
					</view>
				</view>
			</template>
		</nav-bar>
		<view class="main-content" :style="{'height': scrollHeight }">
			<!-- 公告 -->
			<uni-notice-bar show-icon scrollable :text="platformAnnouncement" />
			<!-- <view class="notice-msg">
					<image :src="baseImgUrl + 'home/message.png'" mode=""></image>
					<view class="message">
						这里是平台公告这里是平台公告这里是平台公台
					</view>
					<image :src="baseImgUrl + 'home/message_arrow.png'" mode=""></image>
				</view> -->
			<!-- 轮播图 -->
			<view class="swiper-view row-around">
				<u-swiper :list="swiperList" keyName="url" :autoplay="true" height="280rpx" :indicator="true"
					indicatorStyle="right"></u-swiper>
			</view>
			<!-- menu -->
			<view class="menu-view row-between">
				<view class="menu-item column-center" v-for="(dom, index) in menuList" :key="index"
					@click="pageTo(dom.url,true,dom.title)">
					<u-badge :isDot="getdot.masterRedDot" type="error" v-if="index==2" :absolute="true"
						:offset="[5,20]"></u-badge>
					<u-badge :isDot="getdot.recordRedDot" type="error" v-if="index==3" :absolute="true"
						:offset="[5,20]"></u-badge>
					<image :src="dom.img" mode=""></image>
					<text>{{dom.title}}</text>
				</view>
			</view>
			<!-- 消防常识 -->
			<view class="fire-knowledge" @click="navigator('/subPages/home/fireKnowledge')">
				<image :src="baseImgUrl + 'home/fire_fighting_knowledge.png'" mode=""></image>
				<view style="height:100%;width: calc(100% - 100rpx);">
					<view class="text-ellipsis-two fire-knowledge-text" v-for="(item,index) in fireKnowledge"
						:key="index">
						<rich-text :nodes="item.contentText"></rich-text>
					</view>
				</view>
			</view>
			<!-- 维修区域 -->
			<view class="maintenance row-between">
				<view class="maintenance-item" @click="navigator('/subPages/home/repair', true)">
					<view class="maintenance-title">
						一键报修
					</view>
					<!-- <view class="maintenance-msg">
							这是一个副标题
						</view> -->
				</view>
				<view class="maintenance-right">
					<view class="maintenance-right-setIn"
						v-if="maintainCompany && JSON.stringify(maintainCompany) != '{}'"
						@click="navigator('/subPages/home/maintenanceCompany?companyId='+maintainCompany.id, true)">
						<view class="maintenance-title ellipsis-text" style="width: 250rpx;">
							{{maintainCompany.companyName}}
						</view>
						<view class="maintenance-msg">
							<text>{{maintainCompany.contact}}</text>
							<text style="margin-left: 15rpx;">{{maintainCompany.phoneNumber}}</text>
						</view>
					</view>
					<!-- <view class="maintenance-right-top" v-else
							@click="navigator('/subPages/home/maintenanceApplication', true)">
							<view class="maintenance-title">
								我要维保
							</view>
							 <view class="maintenance-msg">
								这是一个副标题
							</view> 
						</view> -->
					<view class="maintenance-right-top" v-else @click="maintenanceHandler">
						<view class="maintenance-title">
							我要维保
						</view>
					</view>
					<view class="maintenance-right-bottom"
						@click="navigator('/subPages/home/maintenanceRecordsCheck', true)">
						<view class="maintenance-title">
							维保记录查看
						</view>
						<!-- <view class="maintenance-msg">
								这是一个副标题
							</view> -->
					</view>
				</view>
			</view>

			<!-- 新闻咨询 -->
			<!-- <view class="new-model row-between">
					<view class="title row-between">
						新闻资讯
					</view>
					<view class="more" @click="navigator('/subPages/home/lawKnowledge')">
						<text>更多</text>
						<image :src="baseImgUrl + 'home/more.png'" mode=""></image>
					</view>
				</view> -->

			<!-- 新闻咨询列表 -->
			<!-- <view class="new-list">
					<view class="new-item row-center-random " v-for="(item, index) in newList" :key="index" @click="toNewDetail(item)">
						<image :src="baseUrl + item.contentPicture" mode="" class="new-image"></image>
						<view class="new-info">
							<view class="new-title text-ellipsis-two">
								{{item.title}}
							</view> -->
			<!-- <view class="new-mesage ellipsis-text" style="margin-top: 0;">
								<rich-text type="text" :nodes="item.contentText"></rich-text>
							</view> -->
			<!-- <view class="new-mesage">
								{{item.createTime}}
							</view>
						</view>
					</view>
				</view> -->

			<!-- 常见问题 -->
			<view class="new-model row-between">
				<view class="title row-between">
					常见问题
				</view>
				<!-- <view class="more" @click="navigator('/subPages/home/fireFightingKnowledge')">
						<text>更多问题</text>
						<image :src="baseImgUrl+'home/more.png'" mode=""></image>
					</view> -->
			</view>
			<!-- 常见问题列表 -->
			<view class="question-list">
				<u-collapse :border="false">
					<u-collapse-item v-for="(item,index) in questionList" :key="index" :border="false"
						:title="item.title" name="Docs guide">
						<view class="question-content">
							<rich-text class="text-content" :nodes="item.contentText"></rich-text>
						</view>
					</u-collapse-item>
				</u-collapse>
			</view>
			<!-- 机构入驻审核提示 -->
			<u-modal :show="jgrzShow" :title="jgrzTitle" :content='jgrzContent'
				@confirm="checkHandler('jgrz')"></u-modal>
			<!-- 工程师审核提示 -->
			<u-modal :show="gcsShow" :title="gcsTitle" :content='gcsContent' @confirm="checkHandler('gcs')"></u-modal>
			<!-- 师傅驻审核提示 -->
			<u-modal :show="sfrzShow" :title="sfrzTitle" :content='sfrzContent'
				@confirm="checkHandler('sfrz')"></u-modal>
			<!-- 我要维保提示 -->
			<u-modal :show="wywbShow" :title="wywbTitle" :content='wywbContent'
				@confirm="checkHandler('wywb')"></u-modal>
		</view>
	</view>
</template>

<script>
	import {
		getToken,
		removeToken
	} from '@/utils/auth'
	import Home from '@/api/home.js'
	import Apply from '@/api/apply.js'
	import Common from '@/api/common.js'
	import pageConfig from '@/config'
	import {
		toast,
		showConfirm,
		tansParams
	} from '@/utils/common'
	const baseUrl = pageConfig.baseUrl,
		baseImgUrl = pageConfig.baseImgUrl;
	export default {
		data() {
			return {
				baseUrl,
				baseImgUrl,
				scrollHeight: 0,
				swiperList: [],
				menuList: [{
						title: '机构入驻',
						img: baseImgUrl + 'home/institution.png',
						url: '/subPages/home/organizationEnter'
					},
					{
						title: '工程师入驻',
						img: baseImgUrl + 'home/law.png',
						url: '/subPages/home/engineer',
					},
					{
						title: '维修师傅入驻',
						img: baseImgUrl + 'home/master.png',
						url: '/subPages/home/master/masterEnter'
					},
					{
						title: '维修记录',
						img: baseImgUrl + 'home/record.png',
						url: '/subPages/home/maintenanceRecords',
						// 是否需要企业认证
					},
				],
				fireKnowledge: [],
				newList: [],
				questionList: [],
				// 0 未申请 2审核中 1 已审核
				status: 0,
				// 已经入驻
				isSettled: true,
				// 企业信息
				wbEntAuthList: {},
				// 维保公司信息
				maintainCompany: {},
				platformAnnouncement: '',
				jgrzId: null,
				jgrzShow: false,
				jgrzTitle: '驳回原因',
				jgrzContent: '申请信息不全',
				gcsId: null,
				gcsShow: false,
				gcsTitle: '驳回原因',
				gcsContent: '申请信息不全',
				sfrzId: null,
				sfrzShow: false,
				sfrzTitle: '驳回原因',
				sfrzContent: '申请信息不全',
				wywbId: null,
				wywbShow: false,
				wywbTitle: '驳回原因',
				wywbContent: '申请信息不全',
				whetherToEnter: {},
				getdot: {}
			}
		},
		onPullDownRefresh() {
			this.getNewList();
			this.getQuestionList();
			this.getFireKnowledgeList();
			// 获取banner图
			this.getBanners();
			this.getPlatformAnnouncement()
			this.getDots()
			setTimeout(() => {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		mounted() {
			console.log(this.$store.getters)
			// uni.startPullDownRefresh();
			this.scrollHeight = this.$store.getters.heightData.mainHeight + 'px';
		},
		async onShow() {
			// 获取当前用户角色
			let res = await this.getUserInfo();
			if (res.code !== 200) return
			this.checkAll()
			this.getDots()
		},
		onLoad() {
			this.getNewList();
			this.getQuestionList();
			this.getFireKnowledgeList();
			// 获取banner图
			this.getBanners();
			this.getPlatformAnnouncement()
		},

		methods: {
			getDots() {
				Common.getRedDot().then(res => {
					this.getdot = res.data
					console.log(this.getdot, 'res');
				})
			},
			getBanners() {
				Common.getBannerList().then(res => {
					let list = res.rows;
					this.swiperList = list.map(ele => {
						return {
							title: ele.id,
							url: ele.url || baseUrl + ele.img,
							type: 'image'
						}
					})
				})
			},
			async getUserInfo() {
				let res = await Common.getInfo();
				// this.status = res.wbMasterEnter && res.wbMasterEnter.auditStatus || 0;
				this.wbEntAuthList = res.wbEntAuth || {};
				this.maintainCompany = res.maintainCompany || {};
				this.whetherToEnter = res.whetherToEnter || {};
				uni.setStorageSync('userId', res.user.userId)
				uni.setStorageSync('wbEntAuthId', res.wbEntAuth?.id)
				if (res.ifDownload && res.ifDownload.length != 0) {
					uni.showToast({
						title: '您还有未下载文件，请前往维保记录下载',
						icon: 'none'
					});
				}
				return res
			},
			checkAll() {
				// 师傅入驻验证
				Home.getbyUser().then(res => {
					console.log(res, '师傅入驻');
					this.status = res.data?.auditType || 3
					this.sfrzId = res.data?.id || null
					if (res.data?.auditType == 2) {
						this.menuList[2].title = '维修师傅'
					} else {
						this.menuList[2].title = '师傅入驻'
					}
					if (res.data?.ifRead != 0) {
						this.changeCheckInfo('sfrz', res.data ?? null)
					}
				})
				// 机构入驻查看
				Apply.organizationStatus().then(res => {
					this.jgrzId = res.data?.id || null
					if (res.data?.auditType == 2) {
						this.menuList[0].title = '我的机构'
					} else {
						this.menuList[0].title = '机构入驻'
					}
					if (res.data?.ifRead != 0) {
						this.changeCheckInfo('jgrz', res.data ?? null)
					}
				})
				// 工程师入驻查看
				Apply.engineerStatus().then(res => {
					this.gcsId = res.data?.id || null
					if (res.data?.auditType == 2) {
						this.menuList[1].title = '资料补充'
					} else {
						this.menuList[1].title = '工程师入驻'
					}
					if (res.data?.ifRead != 0) {
						this.changeCheckInfo('gcs', res.data ?? null)
					}
				})
				//我要维保
				Home.statesMaintainApply().then(res => {
					this.wywbId = res.data?.id || null
					if (res.data?.ifRead != 0) {
						this.changeCheckInfo('wywb', res.data ?? null)
					}
				})
			},
			// 审核信息改变
			changeCheckInfo(target, value) {
				if (!value) return
				if (value.auditType == 2) {
					switch (target) {
						case 'jgrz':
							this.jgrzShow = true
							this.jgrzTitle = '机构入驻申请通过'
							this.jgrzContent = value.causeOfRejection
							break;
						case 'gcs':
							this.gcsShow = true
							this.gcsTitle = '工程师入驻申请通过'
							this.gcsContent = value.causeOfRejection
							break;
						case 'sfrz':
							this.sfrzShow = true
							this.sfrzTitle = '师傅入驻申请通过'
							this.sfrzContent = value.causeOfRejection
							break;
						case 'wywb':
							this.wywbShow = true
							this.wywbTitle = '我要维保申请跟进'
							this.wywbContent = value.causeOfRejection
							break;
					}
				} else if (value.auditType == 3) {
					switch (target) {
						case 'jgrz':
							this.jgrzShow = true
							this.jgrzTitle = '机构入驻申请驳回'
							this.jgrzContent = value.causeOfRejection
							break;
						case 'gcs':
							this.gcsShow = true
							this.gcsTitle = '工程师入驻申请驳回'
							this.gcsContent = value.causeOfRejection
							break;
						case 'sfrz':
							this.sfrzShow = true
							this.sfrzTitle = '师傅入驻申请驳回'
							this.sfrzContent = value.causeOfRejection
							break;
						case 'wywb':
							this.wywbShow = true
							this.wywbTitle = '我要维保申请作废'
							this.wywbContent = value.causeOfRejection
							break;
					}
				}
			},
			pageTo(url, isVerify = false, title) {
				console.log(isVerify, url)
				if (isVerify) {
					// 先判断是否登录
					if (!getToken()) {
						showConfirm('您还未登录，请先登录?').then(reslv => {
							if (reslv.confirm) {
								removeToken()
								uni.reLaunch({
									url: '/subPages/login/index'
								})
							}
						})
						return;
					} else {
						if (url.includes("maintenanceRecords")) {
							Common.putRedDot({
								ifMaster: 2
							}).then(res => {
								uni.navigateTo({
									url
								})
								console.log(res, 'res1');
							})

						} else {
							const keyValuePair = this.getFirstTrueKeyValuePair()
							console.log(keyValuePair, 'keyValuePair');
							if (keyValuePair !== null) {
								console.log(keyValuePair.key, 'keyValuePair.key');
								switch (keyValuePair.key) {
									case 'ifEngineer':
										if (url.includes("engineer")) {
											this.IsCompanyFun(url, title)
										} else {
											uni.showToast({
												icon: 'none',
												title: this.whetherToEnter.message
											})
										}
										break;
									case 'ifMaintenance':
										uni.showToast({
											icon: 'none',
											title: this.whetherToEnter.message
										})
										break;
									case 'ifMaster':
										if (url.includes("masterEnter")) {
											this.IsCompanyFun(url, title)
										} else {
											uni.showToast({
												icon: 'none',
												title: this.whetherToEnter.message
											})
										}
										break;
									case 'ifOrganization':
										if (url.includes("organizationEnter")) {
											this.IsCompanyFun(url, title)
										} else {
											uni.showToast({
												icon: 'none',
												title: this.whetherToEnter.message
											})
										}
										break;
								}

							} else {
								this.IsCompanyFun(url, title)
							}
						}
						// else if(
						// 	url.includes("maintenanceApplication") 
						// 	|| url.includes('repair') 
						// 	|| url.includes('maintenanceRecordsCheck') 
						// 	|| url.includes('maintenanceRecords')) {
						// 	// 维保申请，一键保修修  维保记录查看 维修记录如果没有企业认证先提示企业认证
						// 	if(this.wbEntAuthList.state != 1) {
						// 		showConfirm('您还没有企业认证，请先进行企业认证?').then(reslv => {
						// 		  if (reslv.confirm) {
						// 		    uni.switchTab({
						// 		    	url: '/pages/mine'
						// 		    })
						// 		  }
						// 		});
						// 		return;
						// 	}
						// }
					}
				}
			},
			getFirstTrueKeyValuePair() {
				const obj = this.whetherToEnter
				for (const key in obj) {
					if (obj.hasOwnProperty(key) && obj[key] === true) {
						return {
							key,
							value: true
						}; // 返回键值对
					}
				}
				return null; // 如果没有找到值为 true 的键值对，则返回 null
			},
			//判断企业认证
			IsCompanyFun(url, name) {
				// 在判断角色
				// 如果已完成企业认证，则不能申请师傅入驻
				if (this.wbEntAuthList && this.wbEntAuthList.state == 1) {
					uni.showToast({
						icon: 'none',
						title: '您已经企业认证，不能在申请' + name
					})
					return;
				}
				if (url.includes("masterEnter")) {
					console.log(this.status, 'url.includes("masterEnter")');
					if (this.status == 3) {
						url = '/subPages/home/master/masterEnter';
					} else if (this.status == 1) {
						url = '/subPages/home/master/notExamine';
					} else {
						url = '/subPages/home/master/masterOrder';
					}
					Common.putRedDot({
						ifMaster: 1
					}).then(res => {
						uni.navigateTo({
							url
						})
					})
					return
				}
				uni.navigateTo({
					url
				})
				console.log(res, 'res1');
			},
			navigator(url, isVerify = false) {
				console.log(isVerify, url)
				if (isVerify) {
					// 先判断是否登录
					if (!getToken()) {
						showConfirm('您还未登录，请先登录?').then(reslv => {
							if (reslv.confirm) {
								removeToken()
								uni.reLaunch({
									url: '/subPages/login/index'
								})
							}
						})
						return;
					}
				}
				uni.navigateTo({
					url
				})
			},
			toNewDetail(item) {
				uni.navigateTo({
					url: "/subPages/home/articleDetails?id=" + item.id
				})
			},
			async getNewList() {
				let res = await Home.getArticleList({
					type: 2,
					pageSize: 5,
					pageNum: 1
				});
				this.newList = res.rows;
				console.log(res)
			},
			async getQuestionList() {
				let res = await Home.getArticleList({
					type: 3,
					pageSize: 100,
					pageNum: 1
				});
				this.questionList = res.rows;
			},
			async getFireKnowledgeList() {
				let res = await Home.getArticleList({
					type: 4,
					pageSize: 2,
					pageNum: 1
				});
				this.fireKnowledge = res.rows;
			},
			async getPlatformAnnouncement() {
				let res = await Home.getArticleList({
					type: 5,
					pageSize: 1,
					pageNum: 1
				});
				this.platformAnnouncement = res.rows[0]?.contentText.split('<p>')[1].split('</p>')[0]
			},
			checkHandler(type) {
				switch (type) {
					case 'jgrz':
						Apply.organizationChange({
							id: this.jgrzId,
							ifRead: 0
						})
						this.jgrzShow = false
						break;
					case 'gcs':
						Apply.engineerChange({
							id: this.gcsId,
							ifRead: 0
						})
						this.gcsShow = false
						break;
					case 'sfrz':
						Home.putMasterEnter({
							id: this.sfrzId,
							ifRead: 0
						})
						this.sfrzShow = false
						break;
					case 'wywb':
						Home.statesMaintain({
							id: this.wywbId,
							ifRead: 0
						})
						this.wywbShow = false
						break;
				}
			},
			maintenanceHandler() {
				const keyValuePair = this.getFirstTrueKeyValuePair()
				console.log(keyValuePair, 'keyValuePair');
				if (keyValuePair !== null) {
					if (keyValuePair.key == 'ifMaintenance') {
						Home.statesMaintainApply().then(res => {
							// 0未申请 1审核中 2通过 3未通过
							if (res.data?.auditType == 1) {
								uni.navigateTo({
									url: '/subPages/home/master/notExamine?title=维保申请&msg=请您耐心等待'
								})
							} else {
								uni.navigateTo({
									url: '/subPages/home/maintenanceApplicationNew',
								})
							}
						})
					} else {
						uni.showToast({
							icon: 'none',
							title: this.whetherToEnter.message
						})
					}
				} else {
					Home.statesMaintainApply().then(res => {
						// 0未申请 1审核中 2通过 3未通过
						if (res.data?.auditType == 1) {
							uni.navigateTo({
								url: '/subPages/home/master/notExamine?title=维保申请&msg=请您耐心等待'
							})
						} else {
							uni.navigateTo({
								url: '/subPages/home/maintenanceApplicationNew',
							})
						}
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.home {
		background-color: #fff;
		height: 100vh;
		background-size: 100%;
		background-repeat: no-repeat;
		display: flex;
		flex-direction: column;
		font-family: "PingFang SC";

		.bg {
			height: 418rpx;
			width: 100vw;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 0;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.logo-header {
		display: flex;

		image {
			width: 48rpx;
			height: 48rpx;
			border-radius: 50%;
			background-color: #D9D9D9;
		}

		.title {
			color: #fff;
			font-size: 34rpx;
			font-weight: 500;
			margin-left: 12rpx;
		}

	}

	.main-content {
		padding: 0 28rpx;
		z-index: 10;
		overflow-y: auto;
	}

	.notice-msg {
		background: #fff;
		border-radius: 16rpx;
		display: flex;
		padding: 22rpx 0;
		padding-left: 20rpx;
		padding-right: 10rpx;
		margin-top: 20rpx;

		image {
			width: 40rpx;
			height: 40rpx;
		}

		.message {
			color: #666;
			font-size: 26rpx;
			flex: 1;
			margin: 0 18rpx;
		}
	}

	/deep/ .uni-noticebar {
		background: #fff !important;
		border-radius: 16rpx;

		.uni-icons {
			color: #2f65f0 !important;
		}

		.uni-noticebar__content-text {
			color: #2f65f0 !important;
		}
	}

	.swiper-view {
		height: 280rpx;
		margin-top: 20rpx;
		border-radius: 24rpx;
		overflow: hidden;

		.img-swiper {
			background: #666;
			width: 100%;
		}

		/deep/.u-swiper {
			width: 100%;
		}
	}

	.menu-view {
		margin-top: 40rpx;

		.menu-item {
			flex: 1;
			align-self: center;
			line-height: 1;
			position: relative;

			image {
				width: 88rpx;
				height: 88rpx;
				margin-bottom: 8rpx;
			}

			text {
				font-size: 24rpx;
			}
		}
	}

	.fire-knowledge {
		padding: 15rpx;
		padding-right: 53rpx;
		background: #F7F8FA;
		border-radius: 24rpx;
		margin-top: 20rpx;
		display: flex;
		align-items: center;
		flex-direction: row;
		height: 70px;

		image {
			width: 66rpx;
			height: 60rpx;
			margin: 0 30rpx 0 11rpx;
		}

		.fire-knowledge-text {
			font-size: 27rpx;
			line-height: 2;
			margin-bottom: 12rpx;
			width: 100%;
			height: 100%;
			display: flex;
			align-items: center;

			&:last-of-type {
				margin-bottom: 0;
			}
		}
	}

	.maintenance {
		margin-top: 20rpx;

		.maintenance-title {
			font-weight: bold;
			font-size: 28rpx;
		}

		.maintenance-msg {
			font-size: 20rpx;
			color: $main-font-auxiliary;
			margin-top: 12rpx;
		}

		.maintenance-item {
			flex: 0 0 278rpx;
			height: 300rpx;
			width: 278rpx;
			background-image: url('../static/images/home/repair_bac.png');
			background-size: 100% 100%;
			// background-position: center;
			background-repeat: no-repeat;
			padding: 26rpx;
			margin-right: 20rpx;
		}

		.maintenance-right {
			flex: 1;
		}

		.maintenance-right-top {
			padding: 26rpx;
			height: 140rpx;
			background-image: url('../static/images/home/maintenance_bac.png');
			background-size: 100% 100%;
			background-repeat: no-repeat;
		}

		.maintenance-right-setIn {
			padding: 26rpx;
			height: 140rpx;
			background-image: url('../static/images/home/setIn.png');
			background-size: 100% 100%;
			background-repeat: no-repeat;
		}

		.maintenance-right-bottom {
			padding: 26rpx;
			height: 140rpx;
			background-image: url('../static/images/home/record_bac.png');
			background-size: 100% 100%;
			background-repeat: no-repeat;
			margin-top: 20rpx;
		}
	}

	.new-model {
		margin-top: 60rpx;
		margin-bottom: 40rpx;

		.title {
			font-weight: 500;
			font-size: 34rpx;

			&::before {
				display: inline-block;
				content: "";
				width: 4rpx;
				height: 30rpx;
				background-color: $main-color;
				vertical-align: middle;
				margin-right: 8rpx;
				border-radius: 4rpx;
			}
		}

		.more {
			font-size: 26rpx;
			color: $main-font-auxiliary;

			image {
				width: 16rpx;
				height: 20rpx;
				margin-left: 12rpx;
				vertical-align: middle;
			}
		}
	}

	.new-list {
		.new-item {
			margin-bottom: 20rpx;

			.new-image {
				flex: 0 0 220rpx;
				width: 220rpx;
				height: 165rpx;
				background: #D9D9D9;
				border-radius: 24rpx;
			}

			.new-info {
				margin-left: 20rpx;
				width: 454rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				height: 165rpx;
				box-sizing: border-box;

				.new-title {
					font-size: 30rpx;
					color: $main-font-black;
					font-weight: 500;
					height: 92rpx;
					overflow: hidden;
					line-height: 46rpx;
				}

				.new-mesage {
					font-size: 26rpx;
					color: $main-font-auxiliary;
					margin-top: 10rpx;
					line-height: 1;

					&:first-of-type {
						margin-top: 0;
					}
				}
			}
		}
	}

	.question-list {
		padding-bottom: 30rpx;

		/deep/.u-collapse-item__content__text {
			padding: 0;
		}

		/deep/.u-cell__body {
			padding: 0;
		}

		/deep/.u-cell__title-text {
			font-weight: 900;
			font-size: 26rpx;
			color: $main-font-black;

			&::before {
				content: ".";
				display: inline-block;
				margin-right: 10rpx;
				font-size: 40rpx;
			}
		}

		/deep/.u-collapse-item {
			margin-bottom: 20rpx;
		}

		.question-content {
			color: $main-font-auxiliary;
			font-size: 24rpx;
			line-height: 44rpx;
		}
	}
</style>